package com.jinyi.wwdeng.pro

import com.jinyi.base.base.BaseFragment
import com.jinyi.base.network.IRequestCallback
import com.jinyi.lib_http.model.HttpParams

/**
 * JinYiTest
 * @Author wwdeng
 * @CreateTime: 2024/4/25 18:06
 * @Annotation：
 */
abstract class ProFragment: BaseFragment() {

    /**
     * 开始请求网络 Get
     * @param url       : 接口地址
     * @param params      : 参数
     * @param callback  :  回调
     */
    open fun onGetRequestAction(url: String, params: HttpParams?, callback: IRequestCallback) {
        val act = context as ProAct
        act.onGetRequestAction(url,params,callback)
    }

    /**
     * 开始请求网络 Post
     * @param url       : 接口地址
     * @param params      : 参数
     * @param callback  :  回调
     */
    open fun onPostRequestAction(url: String, params: HttpParams?, callback: IRequestCallback) {
        val act = context as ProAct
        act.onGetRequestAction(url,params,callback)
    }

    override fun onRequestFinish() {
    }

}